/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.asistente.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Wizard
 */
@Embeddable
public class HdHistorialPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "COD_TICKET")
    private int codTicket;
    @Basic(optional = false)
    @NotNull
    @Column(name = "COD_HISTORIAL")
    private int codHistorial;

    public HdHistorialPK() {
    }

    public HdHistorialPK(int codTicket, int codHistorial) {
        this.codTicket = codTicket;
        this.codHistorial = codHistorial;
    }

    public int getCodTicket() {
        return codTicket;
    }

    public void setCodTicket(int codTicket) {
        this.codTicket = codTicket;
    }

    public int getCodHistorial() {
        return codHistorial;
    }

    public void setCodHistorial(int codHistorial) {
        this.codHistorial = codHistorial;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) codTicket;
        hash += (int) codHistorial;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HdHistorialPK)) {
            return false;
        }
        HdHistorialPK other = (HdHistorialPK) object;
        if (this.codTicket != other.codTicket) {
            return false;
        }
        if (this.codHistorial != other.codHistorial) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.asistente.DAO.HdHistorialPK[ codTicket=" + codTicket + ", codHistorial=" + codHistorial + " ]";
    }
    
}
